<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>琪琪车险</title>

    <link href="/static/ui/css/style.css" rel="stylesheet">
    <link href="/static/ui/css/style-responsive.css" rel="stylesheet">
    <script type="text/javascript">
        function login() {
            $.post('/login.do', $("form").serialize(), function (data) {
                if (data.success) {
                    window.parent.location.href = "/index.do"
                } else {
                    alert(data.msg);
                }
                //配这  个可以自动把String转换为json
            })
        }
    </script>

</head>

<body class="login-body">

<div class="container">

    <form class="form-signin" action="#">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">登 录</h1>
            <img src="/static/ui/images/login-logo.png" alt=""/>
        </div>
        <div class="login-wrap">
            <input type="text" name="username" class="form-control" placeholder="请输入用户名或邮箱" autofocus>
            <input type="password" name="password" class="form-control" placeholder="请输入密码">

            <button class="btn btn-lg btn-login btn-block" type="button" onclick="login()">
                <i class="fa fa-check"></i>
            </button>
            <label class="checkbox">
                <input type="checkbox" value="remember-me"> 记住我
                <span class="pull-right">
                    <a data-toggle="modal" href="#myModal"> 忘记密码?</a>

                </span>
            </label>

        </div>

        <!-- Modal -->
        <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Forgot Password ?</h4>
                    </div>
                    <div class="modal-body">
                        <p>Enter your e-mail address below to reset your password.</p>
                        <input type="text" name="email" placeholder="Email" autocomplete="off" class="form-control placeholder-no-fix">

                    </div>
                    <div class="modal-footer">
                        <button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
                        <button class="btn btn-primary" type="button">Submit</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- modal -->

    </form>

</div>



<!-- Placed js at the end of the document so the pages load faster -->

<!-- Placed js at the end of the document so the pages load faster -->
<script src="/static/ui/js/jquery-1.10.2.min.js"></script>
<script src="/static/ui/js/bootstrap.min.js"></script>
<script src="/static/ui/js/modernizr.min.js"></script>

</body>
</html>
